<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
     <link rel="stylesheet" type="text/css" href="http://127.0.0.1/mogujie/Static/hdjs/hdjs.css"/>
    <script type="text/javascript" src="http://127.0.0.1/mogujie/Static/js/jquery-1.8.2.min.js"></script>
     <script src="http://127.0.0.1/mogujie/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/mogujie/Static/bootstrap/css/bootstrap.min.css"/>
    <title></title>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list" border="1">
        <thead>
        <tr pid=0>
            <td width="30"></td>
            <td>属性id</td>
            <td>属性名称</td>
            <td>属性类别</td>
            <td>属性值</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
       <?php foreach ($data as $k=>$v){?>
	        	<tr tid="<?php echo $v['tid'];?>" pid="<?php echo $v['tid'];?>">
	            <td width="30">
	            	<a href="javascript:;" class="glyphicon glyphicon-plus click"></a>
	            </td>
	            <td><?php echo $v['idtype'];?></td>
	            <td><?php echo $v['typename'];?></td>
	            <td width="200">
					<a href="<?php echo U('list',array('idtype'=>$v['idtype']));?>" class="hd-btn hd-btn-primary hd-btn-xm">属性列表</a>
					<a href="<?php echo U('edit',array('idtype'=>$v['idtype']));?>" class="hd-btn hd-btn-success hd-btn-xm">编辑</a>
					<a href="javascript:del_modal(<?php echo $v['idtype'];?>);" class="hd-btn hd-btn-danger hd-btn-xm">删除</a>
	            </td>
	        </tr>
	    <?php }?>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>
<div id="">
	<a href="<?php echo U('addattr',array('idtype'=>$v['idtype']));?>" class="hd-btn hd-btn-primary hd-btn-xm">添加属性</a>
</div>
</body>
<script type="text/javascript">
	function del_modal(idtype){
		hd_modal({
            width: 400,//宽度
            height: 200,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
				location.href='<?php echo U("del");?>' + '&idtype=' + idtype;
            },
            cancel: function () {//点击关闭后的事件

            }
        });
	}
</script>
</html>


